class Person():
    def __init__(self, name, gender):
        self.name = name
        self.gender = gender

class Teacher(Person):

    def teach(self):
        print(f'{self.name}老师在教课')

class Students(Person):
    def listen(self):
        print(f'{self.name} student have class')


t = Students('Gohn',50)
t.listen()
t = Teacher('鲁迅', 50)
t.teach()